package com.dragon.modules.yuegou.query.product;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.product.HelpMemberRefEntity;
import com.dragon.modules.yuegou.enums.product.HelpMemberRefStatus;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 会员参加助力活动表 动态查询条件
 * 
 * @author px
 * @date 2019-04-12 09:24:07
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class HelpMemberRefQuery extends HelpMemberRefEntity implements Query<HelpMemberRefEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈ID查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 会员ID查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 助力活动ID查询条件 */
	@JsonUnwrapped(prefix = "helpId")
	private Condition<String> helpIdCondition;

    /** SKUID查询条件 */
	@JsonUnwrapped(prefix = "skuId")
	private Condition<String> skuIdCondition;

    /** 购买时间查询条件 */
	@JsonUnwrapped(prefix = "buyTime")
	private Condition<LocalDateTime> buyTimeCondition;

    /** 结束时间查询条件 */
	@JsonUnwrapped(prefix = "endTime")
	private Condition<LocalDateTime> endTimeCondition;

    /** 助力成功时间查询条件 */
	@JsonUnwrapped(prefix = "successTime")
	private Condition<LocalDateTime> successTimeCondition;

    /** 助力最小人数查询条件 */
	@JsonUnwrapped(prefix = "minPeopleQey")
	private Condition<Integer> minPeopleQeyCondition;

    /** 助力最大人数查询条件 */
	@JsonUnwrapped(prefix = "maxPeopleQey")
	private Condition<Integer> maxPeopleQeyCondition;

    /** 当前助力人数查询条件 */
	@JsonUnwrapped(prefix = "nowPeopleQey")
	private Condition<Integer> nowPeopleQeyCondition;

    /** 助力最大值查询条件 */
	@JsonUnwrapped(prefix = "helpMaxValue")
	private Condition<BigDecimal> helpMaxValueCondition;

    /** 助力当前值查询条件 */
	@JsonUnwrapped(prefix = "helpNowValue")
	private Condition<BigDecimal> helpNowValueCondition;

    /** 助力百分比查询条件 */
	@JsonUnwrapped(prefix = "helpPercent")
	private Condition<BigDecimal> helpPercentCondition;

    /** [枚举]助力状态：0-进行中-PROCESS、1-待支付-UNPAID、2-未支付-NONPAY、3-已支付-PAID、4-已结束-OVER查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<HelpMemberRefStatus> statusCondition;

    /** 海报图片查询条件 */
	@JsonUnwrapped(prefix = "posterImg")
	private Condition<String> posterImgCondition;

    /** 发起活动时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 订单号查询条件 */
	@JsonUnwrapped(prefix = "orderNo")
	private Condition<String> orderNoCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public HelpMemberRefQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public HelpMemberRefQuery(HelpMemberRefEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public HelpMemberRefQuery(HelpMemberRefQuery other) {
		super(other);
		if (other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if (other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if (other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if (other.helpIdCondition != null) {
			this.helpIdCondition = other.helpIdCondition.copy();
		}
		if (other.skuIdCondition != null) {
			this.skuIdCondition = other.skuIdCondition.copy();
		}
		if (other.buyTimeCondition != null) {
			this.buyTimeCondition = other.buyTimeCondition.copy();
		}
		if (other.endTimeCondition != null) {
			this.endTimeCondition = other.endTimeCondition.copy();
		}
		if (other.successTimeCondition != null) {
			this.successTimeCondition = other.successTimeCondition.copy();
		}
		if (other.minPeopleQeyCondition != null) {
			this.minPeopleQeyCondition = other.minPeopleQeyCondition.copy();
		}
		if (other.maxPeopleQeyCondition != null) {
			this.maxPeopleQeyCondition = other.maxPeopleQeyCondition.copy();
		}
		if (other.nowPeopleQeyCondition != null) {
			this.nowPeopleQeyCondition = other.nowPeopleQeyCondition.copy();
		}
		if (other.helpMaxValueCondition != null) {
			this.helpMaxValueCondition = other.helpMaxValueCondition.copy();
		}
		if (other.helpNowValueCondition != null) {
			this.helpNowValueCondition = other.helpNowValueCondition.copy();
		}
		if (other.helpPercentCondition != null) {
			this.helpPercentCondition = other.helpPercentCondition.copy();
		}
		this.setOther(other);
	}

	private void setOther(HelpMemberRefQuery other){
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
		if(other.posterImgCondition != null) {
			this.posterImgCondition = other.posterImgCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.orderNoCondition != null) {
			this.orderNoCondition = other.orderNoCondition.copy();
		}
	}

	@Override
	public QueryWrapper<HelpMemberRefEntity> toQueryWrapper() {
		QueryWrapper<HelpMemberRefEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (helpIdCondition != null) {
			helpIdCondition.toWrapper(wrapper, COL_HELP_ID);
		}
		if (skuIdCondition != null) {
			skuIdCondition.toWrapper(wrapper, COL_SKU_ID);
		}
		if (buyTimeCondition != null) {
			buyTimeCondition.toWrapper(wrapper, COL_BUY_TIME);
		}
		if (endTimeCondition != null) {
			endTimeCondition.toWrapper(wrapper, COL_END_TIME);
		}
		if (successTimeCondition != null) {
			successTimeCondition.toWrapper(wrapper, COL_SUCCESS_TIME);
		}
		if (minPeopleQeyCondition != null) {
			minPeopleQeyCondition.toWrapper(wrapper, COL_MIN_PEOPLE_QEY);
		}
		if (maxPeopleQeyCondition != null) {
			maxPeopleQeyCondition.toWrapper(wrapper, COL_MAX_PEOPLE_QEY);
		}
		if (nowPeopleQeyCondition != null) {
			nowPeopleQeyCondition.toWrapper(wrapper, COL_NOW_PEOPLE_QEY);
		}
		if (helpMaxValueCondition != null) {
			helpMaxValueCondition.toWrapper(wrapper, COL_HELP_MAX_VALUE);
		}
		if (helpNowValueCondition != null) {
			helpNowValueCondition.toWrapper(wrapper, COL_HELP_NOW_VALUE);
		}
		if (helpPercentCondition != null) {
			helpPercentCondition.toWrapper(wrapper, COL_HELP_PERCENT);
		}
		return getQueryWrapper(wrapper);
	}

	private QueryWrapper<HelpMemberRefEntity> getQueryWrapper(QueryWrapper<HelpMemberRefEntity> wrapper){
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		if (posterImgCondition != null) {
			posterImgCondition.toWrapper(wrapper, COL_POSTER_IMG);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (orderNoCondition != null) {
			orderNoCondition.toWrapper(wrapper, COL_ORDER_NO);
		}
		return wrapper;
	}
	
	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈ID查询条件
	 * 
	 * @param busdIdCondition 商圈ID查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID查询条件
	 * 
	 * @param memberIdCondition 会员ID查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回助力活动ID查询条件
	 * 
	 * @return helpIdCondition 助力活动ID查询条件
	 */
	public Condition<String> helpId() {
		this.helpIdCondition = new Condition<>();
		return this.helpIdCondition;
	}
	
	/**
	 * 获取助力活动ID查询条件
	 * 
	 * @return helpIdCondition 助力活动ID查询条件
	 */
	public Condition<String> getHelpIdCondition() {
		return helpIdCondition;
	}

	/**
	 * 设置助力活动ID查询条件
	 * 
	 * @param helpIdCondition 助力活动ID查询条件
	 */
	public void setHelpIdCondition(Condition<String> helpIdCondition) {
		this.helpIdCondition = helpIdCondition;
	}

	/**
	 * 构造并返回SKUID查询条件
	 * 
	 * @return skuIdCondition SKUID查询条件
	 */
	public Condition<String> skuId() {
		this.skuIdCondition = new Condition<>();
		return this.skuIdCondition;
	}
	
	/**
	 * 获取SKUID查询条件
	 * 
	 * @return skuIdCondition SKUID查询条件
	 */
	public Condition<String> getSkuIdCondition() {
		return skuIdCondition;
	}

	/**
	 * 设置SKUID查询条件
	 * 
	 * @param skuIdCondition SKUID查询条件
	 */
	public void setSkuIdCondition(Condition<String> skuIdCondition) {
		this.skuIdCondition = skuIdCondition;
	}

	/**
	 * 构造并返回购买时间查询条件
	 * 
	 * @return buyTimeCondition 购买时间查询条件
	 */
	public Condition<LocalDateTime> buyTime() {
		this.buyTimeCondition = new Condition<>();
		return this.buyTimeCondition;
	}
	
	/**
	 * 获取购买时间查询条件
	 * 
	 * @return buyTimeCondition 购买时间查询条件
	 */
	public Condition<LocalDateTime> getBuyTimeCondition() {
		return buyTimeCondition;
	}

	/**
	 * 设置购买时间查询条件
	 * 
	 * @param buyTimeCondition 购买时间查询条件
	 */
	public void setBuyTimeCondition(Condition<LocalDateTime> buyTimeCondition) {
		this.buyTimeCondition = buyTimeCondition;
	}

	/**
	 * 构造并返回结束时间查询条件
	 * 
	 * @return endTimeCondition 结束时间查询条件
	 */
	public Condition<LocalDateTime> endTime() {
		this.endTimeCondition = new Condition<>();
		return this.endTimeCondition;
	}
	
	/**
	 * 获取结束时间查询条件
	 * 
	 * @return endTimeCondition 结束时间查询条件
	 */
	public Condition<LocalDateTime> getEndTimeCondition() {
		return endTimeCondition;
	}

	/**
	 * 设置结束时间查询条件
	 * 
	 * @param endTimeCondition 结束时间查询条件
	 */
	public void setEndTimeCondition(Condition<LocalDateTime> endTimeCondition) {
		this.endTimeCondition = endTimeCondition;
	}

	/**
	 * 构造并返回助力成功时间查询条件
	 * 
	 * @return successTimeCondition 助力成功时间查询条件
	 */
	public Condition<LocalDateTime> successTime() {
		this.successTimeCondition = new Condition<>();
		return this.successTimeCondition;
	}
	
	/**
	 * 获取助力成功时间查询条件
	 * 
	 * @return successTimeCondition 助力成功时间查询条件
	 */
	public Condition<LocalDateTime> getSuccessTimeCondition() {
		return successTimeCondition;
	}

	/**
	 * 设置助力成功时间查询条件
	 * 
	 * @param successTimeCondition 助力成功时间查询条件
	 */
	public void setSuccessTimeCondition(Condition<LocalDateTime> successTimeCondition) {
		this.successTimeCondition = successTimeCondition;
	}

	/**
	 * 构造并返回助力最小人数查询条件
	 * 
	 * @return minPeopleQeyCondition 助力最小人数查询条件
	 */
	public Condition<Integer> minPeopleQey() {
		this.minPeopleQeyCondition = new Condition<>();
		return this.minPeopleQeyCondition;
	}
	
	/**
	 * 获取助力最小人数查询条件
	 * 
	 * @return minPeopleQeyCondition 助力最小人数查询条件
	 */
	public Condition<Integer> getMinPeopleQeyCondition() {
		return minPeopleQeyCondition;
	}

	/**
	 * 设置助力最小人数查询条件
	 * 
	 * @param minPeopleQeyCondition 助力最小人数查询条件
	 */
	public void setMinPeopleQeyCondition(Condition<Integer> minPeopleQeyCondition) {
		this.minPeopleQeyCondition = minPeopleQeyCondition;
	}

	/**
	 * 构造并返回助力最大人数查询条件
	 * 
	 * @return maxPeopleQeyCondition 助力最大人数查询条件
	 */
	public Condition<Integer> maxPeopleQey() {
		this.maxPeopleQeyCondition = new Condition<>();
		return this.maxPeopleQeyCondition;
	}
	
	/**
	 * 获取助力最大人数查询条件
	 * 
	 * @return maxPeopleQeyCondition 助力最大人数查询条件
	 */
	public Condition<Integer> getMaxPeopleQeyCondition() {
		return maxPeopleQeyCondition;
	}

	/**
	 * 设置助力最大人数查询条件
	 * 
	 * @param maxPeopleQeyCondition 助力最大人数查询条件
	 */
	public void setMaxPeopleQeyCondition(Condition<Integer> maxPeopleQeyCondition) {
		this.maxPeopleQeyCondition = maxPeopleQeyCondition;
	}

	/**
	 * 构造并返回当前助力人数查询条件
	 * 
	 * @return nowPeopleQeyCondition 当前助力人数查询条件
	 */
	public Condition<Integer> nowPeopleQey() {
		this.nowPeopleQeyCondition = new Condition<>();
		return this.nowPeopleQeyCondition;
	}
	
	/**
	 * 获取当前助力人数查询条件
	 * 
	 * @return nowPeopleQeyCondition 当前助力人数查询条件
	 */
	public Condition<Integer> getNowPeopleQeyCondition() {
		return nowPeopleQeyCondition;
	}

	/**
	 * 设置当前助力人数查询条件
	 * 
	 * @param nowPeopleQeyCondition 当前助力人数查询条件
	 */
	public void setNowPeopleQeyCondition(Condition<Integer> nowPeopleQeyCondition) {
		this.nowPeopleQeyCondition = nowPeopleQeyCondition;
	}

	/**
	 * 构造并返回助力最大值查询条件
	 * 
	 * @return helpMaxValueCondition 助力最大值查询条件
	 */
	public Condition<BigDecimal> helpMaxValue() {
		this.helpMaxValueCondition = new Condition<>();
		return this.helpMaxValueCondition;
	}
	
	/**
	 * 获取助力最大值查询条件
	 * 
	 * @return helpMaxValueCondition 助力最大值查询条件
	 */
	public Condition<BigDecimal> getHelpMaxValueCondition() {
		return helpMaxValueCondition;
	}

	/**
	 * 设置助力最大值查询条件
	 * 
	 * @param helpMaxValueCondition 助力最大值查询条件
	 */
	public void setHelpMaxValueCondition(Condition<BigDecimal> helpMaxValueCondition) {
		this.helpMaxValueCondition = helpMaxValueCondition;
	}

	/**
	 * 构造并返回助力当前值查询条件
	 * 
	 * @return helpNowValueCondition 助力当前值查询条件
	 */
	public Condition<BigDecimal> helpNowValue() {
		this.helpNowValueCondition = new Condition<>();
		return this.helpNowValueCondition;
	}
	
	/**
	 * 获取助力当前值查询条件
	 * 
	 * @return helpNowValueCondition 助力当前值查询条件
	 */
	public Condition<BigDecimal> getHelpNowValueCondition() {
		return helpNowValueCondition;
	}

	/**
	 * 设置助力当前值查询条件
	 * 
	 * @param helpNowValueCondition 助力当前值查询条件
	 */
	public void setHelpNowValueCondition(Condition<BigDecimal> helpNowValueCondition) {
		this.helpNowValueCondition = helpNowValueCondition;
	}

	/**
	 * 构造并返回助力百分比查询条件
	 * 
	 * @return helpPercentCondition 助力百分比查询条件
	 */
	public Condition<BigDecimal> helpPercent() {
		this.helpPercentCondition = new Condition<>();
		return this.helpPercentCondition;
	}
	
	/**
	 * 获取助力百分比查询条件
	 * 
	 * @return helpPercentCondition 助力百分比查询条件
	 */
	public Condition<BigDecimal> getHelpPercentCondition() {
		return helpPercentCondition;
	}

	/**
	 * 设置助力百分比查询条件
	 * 
	 * @param helpPercentCondition 助力百分比查询条件
	 */
	public void setHelpPercentCondition(Condition<BigDecimal> helpPercentCondition) {
		this.helpPercentCondition = helpPercentCondition;
	}

	/**
	 * 构造并返回[枚举]助力状态：0-进行中-PROCESS、1-待支付-UNPAID、2-未支付-NONPAY、3-已支付-PAID、4-已结束-OVER、5-已下单未支付-TOPAY查询条件
	 * 
	 * @return statusCondition [枚举]助力状态：0-进行中-PROCESS、1-待支付-UNPAID、2-未支付-NONPAY、3-已支付-PAID、4-已结束-OVER、5-已下单未支付-TOPAY查询条件
	 */
	public Condition<HelpMemberRefStatus> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取[枚举]助力状态：0-进行中-PROCESS、1-待支付-UNPAID、2-未支付-NONPAY、3-已支付-PAID、4-已结束-OVER、5-已下单未支付-TOPAY查询条件
	 * 
	 * @return statusCondition [枚举]助力状态：0-进行中-PROCESS、1-待支付-UNPAID、2-未支付-NONPAY、3-已支付-PAID、4-已结束-OVER、5-已下单未支付-TOPAY查询条件
	 */
	public Condition<HelpMemberRefStatus> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置[枚举]助力状态：0-进行中-PROCESS、1-待支付-UNPAID、2-未支付-NONPAY、3-已支付-PAID、4-已结束-OVER、5-已下单未支付-TOPAY查询条件
	 * 
	 * @param statusCondition [枚举]助力状态：0-进行中-PROCESS、1-待支付-UNPAID、2-未支付-NONPAY、3-已支付-PAID、4-已结束-OVER、5-已下单未支付-TOPAY查询条件
	 */
	public void setStatusCondition(Condition<HelpMemberRefStatus> statusCondition) {
		this.statusCondition = statusCondition;
	}

	/**
	 * 构造并返回海报图片查询条件
	 * 
	 * @return posterImgCondition 海报图片查询条件
	 */
	public Condition<String> posterImg() {
		this.posterImgCondition = new Condition<>();
		return this.posterImgCondition;
	}
	
	/**
	 * 获取海报图片查询条件
	 * 
	 * @return posterImgCondition 海报图片查询条件
	 */
	public Condition<String> getPosterImgCondition() {
		return posterImgCondition;
	}

	/**
	 * 设置海报图片查询条件
	 * 
	 * @param posterImgCondition 海报图片查询条件
	 */
	public void setPosterImgCondition(Condition<String> posterImgCondition) {
		this.posterImgCondition = posterImgCondition;
	}

	/**
	 * 构造并返回发起活动时间查询条件
	 * 
	 * @return createdTimeCondition 发起活动时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取发起活动时间查询条件
	 * 
	 * @return createdTimeCondition 发起活动时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置发起活动时间查询条件
	 * 
	 * @param createdTimeCondition 发起活动时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> orderNo() {
		this.orderNoCondition = new Condition<>();
		return this.orderNoCondition;
	}
	
	/**
	 * 获取订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> getOrderNoCondition() {
		return orderNoCondition;
	}

	/**
	 * 设置订单号查询条件
	 * 
	 * @param orderNoCondition 订单号查询条件
	 */
	public void setOrderNoCondition(Condition<String> orderNoCondition) {
		this.orderNoCondition = orderNoCondition;
	}

}
